// 封装组织架构的相关接口函数
import request from '@/utils/request'
// 查询

export function getDepartment() {
  return request({
    url: '/company/department'
  })
}
export function addDepartment(data) {
  return request({
    url: '/company/department',
    data,
    method: 'post'
  })
}
export function delDepartment(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}

export function getDepartmentByID(id) {
  return request({
    url: '/company/department/' + id

  })
}

export function updateDepartment(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}
